<div class="row">
    <div class="col-lg-12">
        <div class="table-responsive">
            <table class="table table-hover table-striped">
                <thead>
                    <tr>
                        <th>Course Title</th>
                        <th>Accessible</th>
                        <th>Certificate</th>
                        <th>Share</th>
                    </tr>
                </thead>
                <tbody>
                    {% for mark in marks %}
                    <tr>
                        <td>{{ mark.course.title }}</td>
                        <td>
                        {% if mark.is_public %}
                            <button onclick="ajax_set_is_public({{ mark.credit_id }});"
                                         id="chg_{{ mark.credit_id }}_btn"
                                       name="chg_{{ mark.credit_id }}_btn"
                                       type="button"
                                      class="btn btn-xs btn-success"><i class="fa fa-unlock"></i> Public
                            </button>
                        {% else %}
                            <button onclick="ajax_set_is_public({{ mark.credit_id }});"
                                         id="chg_{{ mark.credit_id }}_btn"
                                       name="chg_{{ mark.credit_id }}_btn"
                                       type="button"
                                      class="btn btn-xs btn-warning"><i class="fa fa-lock"></i> Private
                            </button>
                        {% endif %}
                        </td>
                        <td>
                            <a href="certificate/{{ mark.credit_id }}"
                                 id="view_{{ mark.credit_id }}_btn"
                               name="view_{{ mark.credit_id }}_btn"
                               type="button"
                              class="btn btn-xs btn-primary"
                              {% if not mark.is_public %}
                              disabled=""
                              {% endif %}><i class="fa fa-external-link"></i> View Document
                            </a>
                            
                        </td>
                        <td>
                            <button onclick="popup_permalink_modal({{ mark.credit_id }});"
                                         id="permalink_{{ mark.credit_id }}_btn"
                                       name="permalink_{{ mark.credit_id }}_btn"
                                       type="button"
                                      class="btn btn-xs btn-default"
                                {% if not mark.is_public %}
                                   disabled=""
                                {% endif %}><i class="fa fa-link"></i> Permalink
                            </button>
                        </td>
                    </tr>
                    {% endfor %}
                </tbody>
            </table>
        </div>
    </div>
</div>